package prehilife;

import java.util.ArrayList;
import java.util.Queue;

public class SimuLife {
	public ArrayList<AbstractCommand> queue = new ArrayList<AbstractCommand>();

	public void setCommand(AbstractCommand commande) {
		queue.add(commande);
	}

	public void execute() {
		queue.remove(0).doCommand();
	}
        public void executeAll(){
            while(!queue.isEmpty()){
                queue.remove(0).doCommand();
            }
        }
}